package cn.itcast.day05;

public class Demo04MathPractise {

    public static void main(String[] args) {
        int count = 0;
        double min = -10.8;
        double max = 5.9;

        /*for (int i = (int)min; i < max; i++) {

            if (Math.abs(i)>6 || Math.abs(i)<2.1) {
                count++;
            }

        }*/
        //double也是可以++的
        for (double i = Math.ceil(min); i < max; i++) {

            if (Math.abs(i)>6 || Math.abs(i)<2.1) {
                count++;
            }

        }
        System.out.println(count);
    }
}
